package cn.midas.system.domain;


import cn.midas.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zy
 * @since 2022-07-11
 */

@Data
public class Role extends BaseDomain {

    private String name;
    private String sn;
    private Long parentId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 当数据不为空的时候才返回
    private List<Role> children = new ArrayList<>();

    // 角色对应的菜单集合
    private List<Long> menus;
    // 角色对应的权限集合
    private List<Long> permissions;
}
